/**
 * 
 */
package com.myBase.core.entity;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.myBase.common.persistence.BaseEntity;

/**
 * 金币录入Entity
 * @author 金币录入
 * @version 2017-05-15
 */
public class Goldcoin extends BaseEntity<Goldcoin> {

    private static final long serialVersionUID = 1L;
    
    private int id;

    private String goldcoinname; // 金币名称

    private String goldcoinmark; // 金币标识

    private Integer goldcoinactivity; // 金币所属活动

    private Date goldcoincollectionstart; // 金币领取开始时间

    private Date goldcoincollectionend; // 金币领取结束时间

    private Integer goldcoinlimitnumber; // 金币限领个数

    private String goldcoindistributiontotalnumber; // 金币发放总个数

    private String goldcoinvaliditystyle; // 金币有限期类型（ 固定时间段   01,按季度计算有效期  02,有效天数  03）

    private Date goldcoinvaliditystart; // 金币有效开始时间

    private Date goldcoinvalidityend; // 金币有效结束时间

    private Integer goldcoinvalidityday; // 金币有效天数

    private String status; // &ldquo;审核中&rdquo;： 01,&ldquo;打回&rdquo;：  02,&ldquo;待发行&rdquo;： 03,&ldquo;发行/使用中&rdquo;：0 4,&ldquo;作废&rdquo;： 05,&ldquo;仅使用，停止发行&rdquo;：06;

    private Integer applystaffid; // 申请人ID

    private String applystaffname; // 申请人名字

    private Integer auditsstaffid; // 审核人id

    private String goldcoindistributionnumber; // 金币已发放个数

    private Date createtime; // 录入时间

    private String description; // 描述

    private String branchid; // 易贷  MS_YIDAI   转赚   MS_ZZ

    private String subchannel; // 渠道（可以为空,发行时看是否关联规则集中有此渠道关键字）

    public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Length(min = 1, max = 80, message = "金币名称长度必须介于 1 和 80 之间")
    public String getGoldcoinname() {
        return goldcoinname;
    }

    public void setGoldcoinname(String goldcoinname) {
        this.goldcoinname = goldcoinname;
    }

    @Length(min = 1, max = 80, message = "金币标识长度必须介于 1 和 80 之间")
    public String getGoldcoinmark() {
        return goldcoinmark;
    }

    public void setGoldcoinmark(String goldcoinmark) {
        this.goldcoinmark = goldcoinmark;
    }

    @NotNull(message = "金币所属活动不能为空")
    public Integer getGoldcoinactivity() {
        return goldcoinactivity;
    }

    public void setGoldcoinactivity(Integer goldcoinactivity) {
        this.goldcoinactivity = goldcoinactivity;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "金币领取开始时间不能为空")
    public Date getGoldcoincollectionstart() {
        return goldcoincollectionstart;
    }

    public void setGoldcoincollectionstart(Date goldcoincollectionstart) {
        this.goldcoincollectionstart = goldcoincollectionstart;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "金币领取结束时间不能为空")
    public Date getGoldcoincollectionend() {
        return goldcoincollectionend;
    }

    public void setGoldcoincollectionend(Date goldcoincollectionend) {
        this.goldcoincollectionend = goldcoincollectionend;
    }

    public Integer getGoldcoinlimitnumber() {
        return goldcoinlimitnumber;
    }

    public void setGoldcoinlimitnumber(Integer goldcoinlimitnumber) {
        this.goldcoinlimitnumber = goldcoinlimitnumber;
    }

    public String getGoldcoindistributiontotalnumber() {
        return goldcoindistributiontotalnumber;
    }

    public void setGoldcoindistributiontotalnumber(String goldcoindistributiontotalnumber) {
        this.goldcoindistributiontotalnumber = goldcoindistributiontotalnumber;
    }

    @Length(min = 1, max = 8, message = "金币有限期类型（ 固定时间段   01,按季度计算有效期  02,有效天数  03）长度必须介于 1 和 8 之间")
    public String getGoldcoinvaliditystyle() {
        return goldcoinvaliditystyle;
    }

    public void setGoldcoinvaliditystyle(String goldcoinvaliditystyle) {
        this.goldcoinvaliditystyle = goldcoinvaliditystyle;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getGoldcoinvaliditystart() {
        return goldcoinvaliditystart;
    }

    public void setGoldcoinvaliditystart(Date goldcoinvaliditystart) {
        this.goldcoinvaliditystart = goldcoinvaliditystart;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getGoldcoinvalidityend() {
        return goldcoinvalidityend;
    }

    public void setGoldcoinvalidityend(Date goldcoinvalidityend) {
        this.goldcoinvalidityend = goldcoinvalidityend;
    }

    public Integer getGoldcoinvalidityday() {
        return goldcoinvalidityday;
    }

    public void setGoldcoinvalidityday(Integer goldcoinvalidityday) {
        this.goldcoinvalidityday = goldcoinvalidityday;
    }

    @Length(min = 1, max = 8, message = "&ldquo;审核中&rdquo;： 01,&ldquo;打回&rdquo;：  02,&ldquo;待发行&rdquo;： 03,&ldquo;发行/使用中&rdquo;：0 4,&ldquo;作废&rdquo;： 05,&ldquo;仅使用，停止发行&rdquo;：06;长度必须介于 1 和 8 之间")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getApplystaffid() {
        return applystaffid;
    }

    public void setApplystaffid(Integer applystaffid) {
        this.applystaffid = applystaffid;
    }

    @Length(min = 0, max = 8, message = "申请人名字长度必须介于 0 和 8 之间")
    public String getApplystaffname() {
        return applystaffname;
    }

    public void setApplystaffname(String applystaffname) {
        this.applystaffname = applystaffname;
    }

    public Integer getAuditsstaffid() {
        return auditsstaffid;
    }

    public void setAuditsstaffid(Integer auditsstaffid) {
        this.auditsstaffid = auditsstaffid;
    }

    public String getGoldcoindistributionnumber() {
        return goldcoindistributionnumber;
    }

    public void setGoldcoindistributionnumber(String goldcoindistributionnumber) {
        this.goldcoindistributionnumber = goldcoindistributionnumber;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Length(min = 0, max = 200, message = "描述长度必须介于 0 和 200 之间")
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Length(min = 0, max = 10, message = "易贷  MS_YIDAI   转赚   MS_ZZ长度必须介于 0 和 10 之间")
    public String getBranchid() {
        return branchid;
    }

    public void setBranchid(String branchid) {
        this.branchid = branchid;
    }

    @Length(min = 0, max = 32, message = "渠道（可以为空,发行时看是否关联规则集中有此渠道关键字）长度必须介于 0 和 32 之间")
    public String getSubchannel() {
        return subchannel;
    }

    public void setSubchannel(String subchannel) {
        this.subchannel = subchannel;
    }

    @Override
    public String toString() {
        return "Goldcoin [goldcoinname=" + goldcoinname + ", goldcoinmark=" + goldcoinmark + ", goldcoinactivity="
                + goldcoinactivity + ", goldcoincollectionstart=" + goldcoincollectionstart + ", goldcoincollectionend="
                + goldcoincollectionend + ", goldcoinlimitnumber=" + goldcoinlimitnumber
                + ", goldcoindistributiontotalnumber=" + goldcoindistributiontotalnumber + ", goldcoinvaliditystyle="
                + goldcoinvaliditystyle + ", goldcoinvaliditystart=" + goldcoinvaliditystart + ", goldcoinvalidityend="
                + goldcoinvalidityend + ", goldcoinvalidityday=" + goldcoinvalidityday + ", status=" + status
                + ", applystaffid=" + applystaffid + ", applystaffname=" + applystaffname + ", auditsstaffid="
                + auditsstaffid + ", goldcoindistributionnumber=" + goldcoindistributionnumber + ", createtime="
                + createtime + ", description=" + description + ", branchid=" + branchid + "]";
    }

}